export interface ApiResponse<T = any> {
  code: number
  message: string
  data: T
}

export interface OrderProduct {
  id: number
  createTime: string
  updateTime: string
  tenantId: number | null
  orderId: number
  goodsId: string
  price: string
  discountPrice: string
  count: number
  remark: string | null
  spec: string | null
  isComment: number
  goodsInfo: {
    id: number
    qty: string
    pics: string | null
    sold: number
    unit: string
    entId: string
    price: string
    title: string
    isPres: number
    status: number
    typeId: number
    content: string | null
    formula: string
    goodsId: string
    mainPic: string | null
    midpack: number
    sortNum: number
    storNum: string
    logogram: string
    planCate: string | null
    subTitle: string | null
    tenantId: number | null
    attribute: string
    brandCode: string | null
    gCategory: string
    goodsCode: string
    goodsSpec: string
    qCategory: string
    approvalNo: string
    createTime: string
    updateTime: string
    salePriceL1: string
    salePriceL2: string
    salePriceL3: string
    salePriceL4: string
    wholLimtNum: number
    manufacturer: string
    nextValPrice: string
    oracleIsHidden: number
    saleTaxPriceL1: string
    saleTaxPriceL2: string
    saleTaxPriceL3: string
    saleTaxPriceL4: string
    oracleGoodsName: string
    isMidpackSaleDisabled: number
  }
}

export interface Order {
  id: number
  createTime: string
  updateTime: string
  title: string
  payType: number
  payTime: string | null
  orderNum: string
  status: number
  price: string
  discountPrice: string
  discountSource: string | null
  address: string | null
  logistics: string | null
  refund: string | null
  refundStatus: number | null
  refundApplyTime: string | null
  remark: string
  closeRemark: string | null
  invoice: number
  wxType: number
  userId: string
  goodsList: OrderProduct[]
}

export interface OrderListResponse {
  code: number
  message: string
  data: {
    list: Order[]
    pagination: {
      page: number
      size: number
      total: number
    }
    subData: {
      totalCount: string
      totalPrice: string
    }
  }
}

export interface OrderCountResponse {
  code: number
  message: string
  data: {
    '待付款': string
    '待发货': string
    '待收货': string
    '待评价': string
    '交易完成': string
    '退款中': string
    '已退款': string
    '已关闭': string
  }
}

export interface PaginationParams {
  page: number
  pageSize: number
}

export interface PaginationResponse<T> {
  list: T[]
  total: number
  page: number
  pageSize: number
} 